package com.youlu.campus.web.address;

import com.youlu.campus.service.visitor.UserAddressInfoService;
import com.youlu.campus.web.common.base.RequestContext;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户地址管理
 */
@RestController
public class UserAddressController {
    @Autowired
    private UserAddressInfoService userAddressInfoService;

    @GetMapping("/mini-app/address/find-one")
    public QResult getAddressInfo() {
        return QResult.success(userAddressInfoService.findByUserId(RequestContext.getUserId()));
    }
}
